<?php

//Load configuration files
require 'config/config.php';

//Load library classes
require 'library/loader.php';
Loader::load_classes();

//Take the initial PATH.
$url = $_SERVER['REQUEST_URI'];
$url = str_replace(BASE_PATH, "", $url);

if (DEVELOPMENT_ENVIRONMENT)
{
    error_reporting(E_ALL | E_STRICT);
}
else
{
    error_reporting(0);
}

// Set errors handling
set_exception_handler(array('Application', 'exception_handler'));

//loads our controller
Application::init($url);
Application::run();